var express = require('express');
var proxy = require('http-proxy-middleware');
var app = express();
// app.use(express.static('../dist/common/netFish'));
app.use(express.static('../dist'));


app.use('/api', proxy.createProxyMiddleware({
    target: 'http://172.31.2.176:9301/',
    changeOrigin: false,
    pathRewrite: {
        "^/api": "/api"
    }
}));
app.use('/v1', proxy.createProxyMiddleware({
    target: 'http://172.31.2.176:19300/',
    changeOrigin: false,
    pathRewrite: {
        "^/v1": "/v1"
    }
}));
app.use('/logger', proxy.createProxyMiddleware({
    target: 'http://172.31.2.176:61400/',
    changeOrigin: false,
    pathRewrite: {
        "^/logger": "/logger"
    }
}));
app.listen(8090, '0.0.0.0');
// app.listen(8000, '192.168.36.209');
